package com.zb.frame.modules.sys.mapper;

import com.zb.frame.modules.common.vo.RouterMenuVO;
import com.zb.frame.modules.sys.entity.Menu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.frame.modules.sys.vo.MenuTreeVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bangZZ
 * @since 2020-06-04
 */
@Repository
public interface MenuMapper extends BaseMapper<Menu> {

    List<MenuTreeVO> getAllList();

    Menu getMenuById(Long id);

    Set<String> getAllPerm();

    Set<String> getUserPerm(@Param("roles") Set<String> roles);

    List<RouterMenuVO> getRouterMenuByPid(Long pId);

}
